<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>app版本信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
	$(document).ready(function() {
		  $(".form_datetime").datetimepicker({ 
			  language:'zh-CN',
			  todayBtn: true,
			  autoclose: true,
			  format: 'yyyy-mm-dd'});
		});
		$(document).ready(function() {
            $('#inputForm').bootstrapValidator({
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
						
					version: {
                            message: 'version格式错误',
                            validators: {
                                notEmpty: {
                                    message: 'version不能为空'
                                }
                            }
                        }
						,
					channel: {
                            message: 'channel格式错误',
                            validators: {
                                notEmpty: {
                                    message: 'channel不能为空'
                                }
                            }
                        }
						,
					note: {
                            message: 'note格式错误',
                            validators: {
                                notEmpty: {
                                    message: 'note不能为空'
                                }
                            }
                        }
						,
					onlineTime: {
                            message: 'onlineTime格式错误',
                            validators: {
                                notEmpty: {
                                    message: 'onlineTime不能为空'
                                }
                            }
                        }
						,
					forceUpgradeFlag: {
                            message: 'forceUpgradeFlag格式错误',
                            validators: {
                                notEmpty: {
                                    message: 'forceUpgradeFlag不能为空'
                                }
                            }
                        }
						,
					packageUri: {
                            message: 'packageUri格式错误',
                            validators: {
                                notEmpty: {
                                    message: 'packageUri不能为空'
                                }
                            }
                        }
						,
					platform: {
                            message: 'platform格式错误',
                            validators: {
                                notEmpty: {
                                    message: 'platform不能为空'
                                }
                            }
                        }
                }
            })
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs nav-tabss">
		<li><a href="${ctx}/basedata/appVersion/">app版本信息列表</a></li>
		<li class="active"><a href="${ctx}/basedata/appVersion/form?id=${appVersion.id}">app版本信息<shiro:hasPermission name="basedata:appVersion:edit">${not empty appVersion.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="basedata:appVersion:edit">查看</shiro:lacksPermission></a></li>
	</ul>
	<div class="ibox-content">
		<form:form id="inputForm" modelAttribute="appVersion" action="${ctx}/basedata/appVersion/save" method="post" class="form-horizontal">
			<tags:message content="${message}"/>
			<form:hidden path="id"/>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="version">版本号:</label>
                    <div class="col-sm-4">
                        <form:input path="version" htmlEscape="false" class="required form-control"/>
                        <span class="help-inline"><font color="red">*</font> </span>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="channel">渠道:</label>
                    <div class="col-sm-4">
                        <form:select path="channel" htmlEscape="false" class="required form-control">
	                        <form:option value="ALL">所有渠道</form:option>
                        </form:select>
                        <span class="help-inline"><font color="red">*</font> </span>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="note">中文说明:</label>
                    <div class="col-sm-4">
                        <form:textarea path="note" htmlEscape="false" class="required form-control"/>
                        <span class="help-inline"><font color="red">*</font> </span>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="englishNote">英文说明:</label>
                    <div class="col-sm-4">
                        <form:textarea path="englishNote" htmlEscape="false" class="required form-control"/>
                        <span class="help-inline"><font color="red">*</font> </span>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group" >
                    <label class="col-sm-2 control-label" for="onlineTime">上线时间:</label>
                    <div class="col-sm-4">
                        <input readonly type="text" class="input-sm form-control form_datetime" name="onlineTime" id="onlineTime" value="<fmt:formatDate value="${onlineTime}" pattern="yyyy-MM-dd"/>">
                        <span class="help-inline"><font color="red">*</font> </span>
                    </div>
                </div>
                
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="packageUri">下载地址:</label>
                    <div class="col-sm-4">
                        <form:input path="packageUri" htmlEscape="false" class="required form-control"/>
                        <span class="help-inline"><font color="red">*</font> </span>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="platform">平台:</label>
                    <div class="col-sm-4">
                        <form:select path="platform" htmlEscape="false" class="required form-control">
                        <form:option value="android">android</form:option>
                        <form:option value="ios">ios</form:option>
                        <form:option value="ipad">ipad</form:option>
                        </form:select>
                        <span class="help-inline"><font color="red">*</font> </span>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label"></label>
				<div class="col-sm-4">
					<shiro:hasPermission name="basedata:appVersion:edit">
						<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
					</shiro:hasPermission>
					<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
				</div>
			</div>
		</form:form>
	</div>
</body>
</html>
